<?php
use think\facade\Route;


// 配置跨域
Route::allowCrossDomain([
    /** 设置跨域允许的header头信息 , 增加token字段 */
    'Access-Control-Allow-Headers'     => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With, authKey, Accept, Origin, token',
    //    允许所有请求
    'Access-Control-Allow-Origin'      => '*',
]);
Route::get('/', function () {
    return view('index/index');
});
Route::post('/login','Login/login');
Route::get('/active/code/download','Login/download');

Route::post('/modify/password','Manager/modifyPass');
Route::get('/manager/advise/clear','Manager/adviseClear');
Route::get('/manager/list/advise','Manager/adviseList');
Route::get('/manager/advise','Manager/advise');
//公告管理
Route::post('/notice/save','Notice/save');
Route::get('/notice/list','Notice/list');
Route::get('/notice/top','Notice/top');
Route::get('/notice/delete/:id','Notice/delete');
//标语设置
Route::get('/home/slogan/setting','Home/homeSlogan');
Route::get('/home/phone/:telephone','Home/phone');
Route::get('/home/index','Home/index');
Route::post('/home/img/setting','Home/homeImg');
Route::get('/detail/slogan/setting','Home/detailSlogan');
//设置详情页
Route::get('/detail/slogan/setting','Detail/detailSlogan');
Route::post('/detail/notice','Detail/notice');
Route::get('/detail/index','Detail/index');
Route::post('/detail/img/setting','Detail/detailImg');

//学生管理
Route::post('/student/save','Student/save');
Route::post('/student/upload','Student/upload');
Route::get('/student/list','Student/list');
Route::get('/student/delete/:id','Student/delete');
//团体管理
Route::post('/origanziation/save','Origanziation/save');
Route::post('/origanziation/upload','Origanziation/upload');
Route::get('/origanziation/list','Origanziation/list');
Route::get('/origanziation/delete/:id','Origanziation/delete');

//奖项管理
Route::post('/prize/save','Prize/save');
Route::get('/prize/list','Prize/prizeList');
Route::get('/prize/item/list','Prize/list');
Route::get('/prize/delete/:id','Prize/delete');
Route::get('/prize/draw','Prize/draw');


